﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MySql.Data.MySqlClient;
using MySql.Data;
using System.Data;

namespace SQLWrapper
{
    public static class MySQLParametersExtensions
    {
        public static MySqlParameter Add(this MySqlParameterCollection collection, string parameterName,MySqlDbType type,ParameterDirection direction)
        {
            MySqlParameter parameter = new MySqlParameter(parameterName, type);
            parameter.Direction = direction;
            return collection.Add(parameter);
        }

        public static MySqlParameter Add(this MySqlParameterCollection colletion,string parameterName,object value,ParameterDirection direction)
        {
            MySqlParameter parameter = new MySqlParameter(parameterName, value);
            parameter.Direction = direction;
            return colletion.Add(parameter);
        }
    }
}
